<?php
session_start();
require_once("basic.class.php");
$user_id = $_POST['user_id'];
$PN = $_POST['PN'];
$vote = new Vote();
$user_info = $vote->ajaxVote($_SESSION['user_account'],$user_id,$PN);
if($user_info != 'hasVoted'):
	$str = '';
	foreach($user_info as $key => $value):
		$voteNum = $vote->ajaxVoteNum($value['id'],$value['position_name']);
	$str = $str."<span style='margin-left:25px;font-size:20px;'>".$value['name']."&nbsp;&nbsp;</span><span class='button hiddenPN hiddenId' style='color:red; font-size:18px;'>获得".$voteNum."票</span>";
	endforeach;

	echo $str;
endif;
?>
